﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class ReportHistory : ActiveRecordBase<ReportHistory>
    {
		#region Const Definition
		
		public const string CONST_ReportID								= "ReportID";
		public const string CONST_ReportDate							= "ReportDate";
		public const string CONST_ReportType							= "ReportType";
		public const string CONST_ReportFileName						= "ReportFileName";
		public const string CONST_ReportContent							= "ReportContent";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _reportID;
        
        // Non Key
        private Nullables.NullableDateTime _reportDate;
        private System.String _reportType;
        private System.String _reportFileName;
        private string _reportContent;

        // Parents
        
        
		

        #endregion

        public ReportHistory() {
               
        }
        public ReportHistory(
            Nullables.NullableDateTime reportDate
            ,System.String reportType
            ,System.String reportFileName
            ,string reportContent) : this() {
                
            this._reportDate = reportDate; 
            this._reportType = reportType; 
            this._reportFileName = reportFileName; 
            this._reportContent = reportContent; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_REPORTHISTORY_REPORTID")]
		#endif
        public System.Int32 ReportID {
            get { return this._reportID; }
            set {  this._reportID = value; }
        }
        
        // Non Key
        [Property]
        public Nullables.NullableDateTime ReportDate {
            get { return this._reportDate; }
			set { this._reportDate = value; }
        }
        
        [Property]
        public System.String ReportType {
            get { return this._reportType; }
			set { if (value == null) return; if (value.Length > 50) this._reportType = value.Substring(0,50); else this._reportType = value; }	
        }
        
        [Property]
        public System.String ReportFileName {
            get { return this._reportFileName; }
			set { if (value == null) return; if (value.Length > 200) this._reportFileName = value.Substring(0,200); else this._reportFileName = value; }	
        }
        
        [Property]
        public string ReportContent {
            get { return this._reportContent; }
			set { this._reportContent = value; }
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public ReportHistory Clone()
		{
			ReportHistory newReportHistory = new ReportHistory();
			
            newReportHistory.ReportDate = this._reportDate; 
            newReportHistory.ReportType = this._reportType; 
            newReportHistory.ReportFileName = this._reportFileName; 
            newReportHistory.ReportContent = this._reportContent; 
			return newReportHistory;
		}
    }
}



